import React from 'react'
import { Navigate } from 'react-router-dom'

export default function Hoc({comp,url}) {
    let token = localStorage.getItem('token');
  return token ? comp : <Navigate to={url} />;
}
